
# -*- coding: utf-8 -*-

import datetime
from peewee import *
#from models.User import User
from config.Config import DATABASE_LOGS

class BaseModelLogs(Model):
	class Meta:
		database = DATABASE_LOGS


class Logs(BaseModelLogs):
	username = CharField()
	distance = IntegerField()
	asknumber = IntegerField()
	errornames = CharField()
	b64photo = TextField()
	datetime = DateTimeField(default=datetime.datetime.now)
	#user = ForeignKeyField(User)

	def persist(self):
		self.save()
